<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<script language=javascript>
javascript:window.history.forward(1);
javascript:window.history.forward(-1);
</script>
<script TYPE="text/javascript">
function numbersonly(myfield, e, dec)
{
var key;
var keychar;

if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
keychar = String.fromCharCode(key);

// control keys
if ((key==null) || (key==0) || (key==8) || 
    (key==9) || (key==13) || (key==27) )
   return true;

// numbers
else if ((("0123456789").indexOf(keychar) > -1))
   return true;

// decimal point jump
else if (dec && (keychar == "."))
   {
   myfield.form.elements[dec].focus();
   return false;
   }
else
   return false;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<s:set name="webFramework" value="#session['USERROLE']"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>LM Design</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="form.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="stmenu.js"></script>
<script type="text/javascript" src="date-picker.js"></script>
</head>
<body>
<div class="bodybox">
<div class="headerbar_top"> Welcome ${currentUserDetails.name}</div>
<div class="header">

</div>
<div class="wrapper">
<div class="navigation">
<a href="http://www.dhtml-menu-builder.com"  style="display:none;visibility:hidden;">Navigation Menu</a>
<!--<script type="text/javascript" src="nav.js"></script>
  -->
  <s:if test="%{#webFramework=='Manager'}">	
			
			<script type="text/javascript" src="locatationMngr.js"></script>
		</s:if>
		<s:if test="%{#webFramework=='Admin'}">		
		<script type="text/javascript" src="admin.js"></script>
		</s:if>
		<s:if test="%{#webFramework=='Operator'}">	
			<script type="text/javascript" src="operator.js"></script>
		</s:if>
		<s:if test="%{#webFramework=='Authorizer'}">		
			<script type="text/javascript" src="authorizer.js"></script>
		</s:if>
		
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</div>
<!-- navigation end-->
<div class="content">
<h4>Add User</h4>
 <s:form action="addUser" method="post" theme="simple"> 
<table>
<tr><td></td><td colspan="2"><font color="#dc143c" face="verdana, arial, helvetica, sans-serif">
    <s:fielderror> </s:fielderror></font></td></tr>
	
  <tr>
    <td class="right"><label for="jiid">JIID</label></td>
    <td class="left">&nbsp;</td>
    <td class="left"><s:textfield name="jiid" id="jiid" tabindex="1" readonly="true" cssStyle="background-color:#CCCCCC" value="777"/></td>
  </tr>
  <tr>
    <td class="right"><label for="insanId">Insan ID</label></td>
    <td class="left">&nbsp;</td>
    <td class="left"><s:textfield name="insanId" id="insanId" tabindex="2" onKeyPress="return numbersonly(this, event)" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="right"><label for="name">Name</label></td>
    <td class="left">&nbsp;</td>
    <td class="left"><s:textfield name="name" id="name" tabindex="3" /></td>
  </tr>
  <tr>
    <td class="right"><label for="address">Address</label></td>
    <td class="left">&nbsp;</td>
    <td class="left"><s:textarea rows="4" name="address" cols="23" tabindex="4" id="address"/></td>
  </tr>
  <tr>
    <td class="right"><label for="block">Tehsil/Block</label></td>
    <td class="left">&nbsp;</td>
    <td class="left">
    <s:select style="width:155px" name="block" size="1" tabindex="5" id="block" list="#{'':'----Select----', 'Gurgaon':'Gurgaon','Preet Nagar':'Preet Nagar','Kalkaji':'Kalkaji','Badarpur':'Badarpur'}"></s:select>
    </td>
  </tr>
  <tr>
    <td class="right"><label for="district">District</label></td>
    <td class="left">&nbsp;</td>
    <td class="left">
    <s:select style="width:155px" name="district" size="1" tabindex="6" id="district" list="#{'':'----Select----', 'Delhi':'Delhi','Gurgaon':'Gurgaon','Sirsa':'Sirsa','Panipat':'Panipat'}"></s:select>
    </td>
  </tr>
  <tr>
    <td class="right"><label for="state">State</label></td>
    <td class="left">&nbsp;</td>
    <td class="left">
    <s:select style="width:155px" name="state" size="1" tabindex="7" id="state" list="#{'':'----Select----', 'Haryana':'Haryana','Punjab':'Punjab','Uttar Pradesh':'Uttar Pradesh','Himachal':'Himachal'}"></s:select>
    </td>
  </tr>
  <tr>
    <td class="right"><label for="country">Country</label></td>
    <td class="left">&nbsp;</td>
    <td class="left">
    <s:select style="width:155px" name="country" size="1" tabindex="8" id="country" list="#{'':'----Select----', 'India':'India','China':'China','Japan':'Japan','Canada':'Canada'}"></s:select>
</td>
  </tr>
  <tr>
    <td class="right"><label for="contactNumber">Contact Number</label></td>
    <td class="left">&nbsp;</td>
    <td class="left"><s:textfield name="contactNumber"  tabindex="9"  id="contactNumber" onKeyPress="return numbersonly(this, event)" maxlength="10" /></td>
  </tr>
  <!--<tr>
    <td class="right"><label for="roleID">Role ID</label></td>
    <td class="left">&nbsp;</td>
    <td class="left"><s:textfield name="roleID"  tabindex="10" id="roleID" /></td>
  </tr>
  <tr>
    <td class="right"><label for="password">Password</label></td>
    <td class="left">&nbsp;</td>
    <td class="left"><s:password name="password"  tabindex="11"  id="password" /> </td>
  </tr>-->
  <tr>
    <td class="right"><label for="status">Status</label></td>
    <td class="left">&nbsp;</td>
    <td class="left">
    <s:select style="width:155px" name="status" size="1" tabindex="12" id="status" list="#{'Active':'Active','Inactive':'Inactive','Hold':'Hold'}"></s:select>
    </td>
  </tr>
  <tr>
    <td class="right"><label for="role">Role</label></td>
    <td class="left">&nbsp;</td>
    <td class="left">
    <s:select name="role" list="#session['roleList']" listKey="roleId" listValue="roleDescription" />
    <!--<s:select style="width:155px" name="role" size="1" tabindex="13" id="role" list="#{'':'----Select----', '1':'Operator', '2':'Authorizer', '3':'Location Manager', '4':'Super Admin'}"></s:select>-->
    </td>
  </tr>
  
  <tr>
    <td class="right"><label for="role">Location Groups</label></td>
    <td class="left">&nbsp;</td>
    <td class="left"><!--
    	
		
    	 <s:optiontransferselect doubleList="rightGroup" 
	    	list="#session['GROUPS']"  name="leftSelected" 
	    	doubleName="rightSelected"  headerKey="-1" listKey="groupId" listValue="groupName" allowUpDownOnRight="false" allowUpDownOnLeft="false"
	     	headerValue="--- Please Select ---" doubleHeaderKey="-1" 
	    	doubleHeaderValue="--- Please Select ---"></s:optiontransferselect> 
    	
    	--><s:select list="#session['GROUPS']" listKey="groupId"  listValue="groupName" headerKey="-1" multiple="true" name="selectedGroups"></s:select>
    	
    	<%--  <s:optiontransferselect 
	  label="Employee Records"
	  name="leftValue"
	  leftTitle="RoseIndia"
	  rightTitle="JavaJazzUp"
	  list="{'Deepak Kumar', 'Sushil Kumar','Vinod Kumar','Deepak Monthy',
	  'Deepak Mihanti', 'Sushil Kumar', 'Ravi Kant Kumar'}"
	  headerKey="headerKey"
	  headerValue="--- Please Select ---"
	  doubleName="rightValue"
	  doubleList="{'Amar Deep Patel', 'Amit Kumar','Chandan Kumar', 
	   'Noor Kumar','Tammana Kumari'}"
	  doubleHeaderKey="doubleHeaderKey"
	  doubleHeaderValue="--- Please Select ---" /> --%>
    	
    	
	</td>
  </tr>
  
  <!--<tr>
    <td class="right"><label for="startDate">Start Date</label></td>
    <td class="left">&nbsp;</td>
    <td class="left">
    <s:textfield name="startDate" tabindex="14" id="startDate" onkeypress="return valEnteredKeyDATE(event);"></s:textfield>
	<s:a href="javascript:show_calendar('addLocation.startDate');" onMouseOver="window.status='Date Picker';return true;" onMouseOut="window.status='';return true;"><img  src="show-calendar.gif" width=20 height=20 border=0></s:a>
	</td>
  </tr>
  <tr>
    <td class="right"><label for="endDate">End Date</label></td>
    <td class="left">&nbsp;</td>
    <td class="left">
	<s:textfield name="endDate" tabindex="14" id="endDate" onkeypress="return valEnteredKeyDATE(event);"></s:textfield>
	<s:a href="javascript:show_calendar('addLocation.endDate');" onMouseOver="window.status='Date Picker';return true;" onMouseOut="window.status='';return true;">
<img  src="show-calendar.gif" width=20 height=20 border=0></s:a>
	</td>
  </tr>
  <tr>
    <td class="right"><label for="designation">Designation</label></td>
    <td class="left">&nbsp;</td>
    <td class="left"><input type="text" name="designation"  tabindex="16" id="designation" /></td>
  </tr>-->
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><s:submit name="Add" value="Add" tabindex="17" id="Add" />
      </td>
  </tr>
</table>
 <p>&nbsp;</p>
 </s:form>
</div>
<!-- content end-->
</div> 
<!-- wrapper end-->
<div class="bottom_strip"></div>
<div class="headerbar_bottom">
&copy; Copyright 2011. Dera Sacha Sauda, Sirsa-125055 (Haryana)
<br />
Designed By: DSS IT WING</div>
</div>
</body>
</html>
